<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: mets::simple_tabu_list类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classmets_1_1simple__tabu__list.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-types">Protected 类型</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="classmets_1_1simple__tabu__list-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">mets::simple_tabu_list类 参考<div class="ingroups"><a class="el" href="group__tabu__search.html">Tabu Search</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Simplistic implementation of a tabu-list.  
 <a href="classmets_1_1simple__tabu__list.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="tabu-search_8hh_source.html">tabu-search.hh</a>&gt;</code></p>
<div class="dynheader">
类 mets::simple_tabu_list 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classmets_1_1simple__tabu__list.png" usemap="#mets::simple_5Ftabu_5Flist_map" alt=""/>
  <map id="mets::simple_5Ftabu_5Flist_map" name="mets::simple_5Ftabu_5Flist_map">
<area href="classmets_1_1tabu__list__chain.html" title="An abstract tabu list" alt="mets::tabu_list_chain" shape="rect" coords="0,0,131,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acf40a93816b812b909d8c091eb5babdd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simple__tabu__list.html#acf40a93816b812b909d8c091eb5babdd">simple_tabu_list</a> (unsigned int <a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>)</td></tr>
<tr class="memdesc:acf40a93816b812b909d8c091eb5babdd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ctor. Makes a tabu list of the specified tenure.  <a href="classmets_1_1simple__tabu__list.html#acf40a93816b812b909d8c091eb5babdd">更多...</a><br /></td></tr>
<tr class="separator:acf40a93816b812b909d8c091eb5babdd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d25561c383c65355e2f9aa8a45932f9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simple__tabu__list.html#a5d25561c383c65355e2f9aa8a45932f9">simple_tabu_list</a> (<a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> *next, unsigned int <a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>)</td></tr>
<tr class="memdesc:a5d25561c383c65355e2f9aa8a45932f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ctor. Makes a tabu list of the specified tenure.  <a href="classmets_1_1simple__tabu__list.html#a5d25561c383c65355e2f9aa8a45932f9">更多...</a><br /></td></tr>
<tr class="separator:a5d25561c383c65355e2f9aa8a45932f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8c203aa601bf363f0037c60c6bc5c3c"><td class="memItemLeft" align="right" valign="top"><a id="ad8c203aa601bf363f0037c60c6bc5c3c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simple__tabu__list.html#ad8c203aa601bf363f0037c60c6bc5c3c">~simple_tabu_list</a> ()</td></tr>
<tr class="memdesc:ad8c203aa601bf363f0037c60c6bc5c3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor <br /></td></tr>
<tr class="separator:ad8c203aa601bf363f0037c60c6bc5c3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5a5ba0389d4e09042eb4efdf3266639"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simple__tabu__list.html#ac5a5ba0389d4e09042eb4efdf3266639">tabu</a> (<a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;sol, <a class="el" href="classmets_1_1move.html">move</a> &amp;mov)</td></tr>
<tr class="memdesc:ac5a5ba0389d4e09042eb4efdf3266639"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make move a tabu.  <a href="classmets_1_1simple__tabu__list.html#ac5a5ba0389d4e09042eb4efdf3266639">更多...</a><br /></td></tr>
<tr class="separator:ac5a5ba0389d4e09042eb4efdf3266639"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb83345be7ded09bc71fb56a98cc50e2"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1simple__tabu__list.html#afb83345be7ded09bc71fb56a98cc50e2">is_tabu</a> (<a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;sol, <a class="el" href="classmets_1_1move.html">move</a> &amp;mov) const</td></tr>
<tr class="memdesc:afb83345be7ded09bc71fb56a98cc50e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if the move is tabu for the given solution.  <a href="classmets_1_1simple__tabu__list.html#afb83345be7ded09bc71fb56a98cc50e2">更多...</a><br /></td></tr>
<tr class="separator:afb83345be7ded09bc71fb56a98cc50e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classmets_1_1tabu__list__chain"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classmets_1_1tabu__list__chain')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classmets_1_1tabu__list__chain.html">mets::tabu_list_chain</a></td></tr>
<tr class="memitem:a26e7c52ab636e9a84b95d48ee7f8a6a1 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a26e7c52ab636e9a84b95d48ee7f8a6a1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a26e7c52ab636e9a84b95d48ee7f8a6a1">tabu_list_chain</a> (const <a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> &amp;)</td></tr>
<tr class="memdesc:a26e7c52ab636e9a84b95d48ee7f8a6a1 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">purposely not implemented (see Effective C++) <br /></td></tr>
<tr class="separator:a26e7c52ab636e9a84b95d48ee7f8a6a1 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7347fdbe887194d970b0189531b8bf4e inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a7347fdbe887194d970b0189531b8bf4e"></a>
<a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a7347fdbe887194d970b0189531b8bf4e">operator=</a> (const <a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> &amp;)</td></tr>
<tr class="memdesc:a7347fdbe887194d970b0189531b8bf4e inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">purposely not implemented (see Effective C++) <br /></td></tr>
<tr class="separator:a7347fdbe887194d970b0189531b8bf4e inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58a0088e572ec5b923339f2d34bd53b6 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a58a0088e572ec5b923339f2d34bd53b6"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a58a0088e572ec5b923339f2d34bd53b6">tabu_list_chain</a> (unsigned int <a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>)</td></tr>
<tr class="memdesc:a58a0088e572ec5b923339f2d34bd53b6 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an abstract tabu list with a certain tenure <br /></td></tr>
<tr class="separator:a58a0088e572ec5b923339f2d34bd53b6 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09efc3cb9bca2efb792c05a2e97d5930 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a09efc3cb9bca2efb792c05a2e97d5930"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a09efc3cb9bca2efb792c05a2e97d5930">tabu_list_chain</a> (<a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> *next, unsigned int <a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>)</td></tr>
<tr class="memdesc:a09efc3cb9bca2efb792c05a2e97d5930 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an abstract tabu list with a certain tenure and a chained tabu list that decorates this one <br /></td></tr>
<tr class="separator:a09efc3cb9bca2efb792c05a2e97d5930 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b0751c6d11f1c219a04ddd7cbd64089 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a0b0751c6d11f1c219a04ddd7cbd64089"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a0b0751c6d11f1c219a04ddd7cbd64089">~tabu_list_chain</a> ()</td></tr>
<tr class="memdesc:a0b0751c6d11f1c219a04ddd7cbd64089 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor <br /></td></tr>
<tr class="separator:a0b0751c6d11f1c219a04ddd7cbd64089 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade9d2204b5c29292e1e8392d1c6b9497 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a> () const</td></tr>
<tr class="memdesc:ade9d2204b5c29292e1e8392d1c6b9497 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tenure of this tabu list.  <a href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">更多...</a><br /></td></tr>
<tr class="separator:ade9d2204b5c29292e1e8392d1c6b9497 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8962ea0fa628f86d7b96b7737fc79cf3 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmets_1_1tabu__list__chain.html#a8962ea0fa628f86d7b96b7737fc79cf3">tenure</a> (unsigned int tenure)</td></tr>
<tr class="memdesc:a8962ea0fa628f86d7b96b7737fc79cf3 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tenure of this tabu list.  <a href="classmets_1_1tabu__list__chain.html#a8962ea0fa628f86d7b96b7737fc79cf3">更多...</a><br /></td></tr>
<tr class="separator:a8962ea0fa628f86d7b96b7737fc79cf3 inherit pub_methods_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected 类型</h2></td></tr>
<tr class="memitem:ae6a7eba6924e9fbd7e7b056f4c26ea89"><td class="memItemLeft" align="right" valign="top"><a id="ae6a7eba6924e9fbd7e7b056f4c26ea89"></a>
typedef std::deque&lt; <a class="el" href="classmets_1_1move.html">move</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>move_list_type</b></td></tr>
<tr class="separator:ae6a7eba6924e9fbd7e7b056f4c26ea89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f732d6a1607f4391d1b461e366fc1a7"><td class="memItemLeft" align="right" valign="top"><a id="a0f732d6a1607f4391d1b461e366fc1a7"></a>
typedef std::tr1::unordered_map&lt; <a class="el" href="classmets_1_1mana__move.html">mana_move</a> *, int, <a class="el" href="classmets_1_1mana__move__hash.html">mana_move_hash</a>, <a class="el" href="structmets_1_1dereferenced__equal__to.html">dereferenced_equal_to</a>&lt; <a class="el" href="classmets_1_1mana__move.html">mana_move</a> * &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>move_map_type</b></td></tr>
<tr class="separator:a0f732d6a1607f4391d1b461e366fc1a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:a60a35ec6f3207da45b33b2513a974a36"><td class="memItemLeft" align="right" valign="top"><a id="a60a35ec6f3207da45b33b2513a974a36"></a>
move_list_type&#160;</td><td class="memItemRight" valign="bottom"><b>tabu_moves_m</b></td></tr>
<tr class="separator:a60a35ec6f3207da45b33b2513a974a36"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adde59ad7324bdbe9a8bf3304144eb094"><td class="memItemLeft" align="right" valign="top"><a id="adde59ad7324bdbe9a8bf3304144eb094"></a>
move_map_type&#160;</td><td class="memItemRight" valign="bottom"><b>tabu_hash_m</b></td></tr>
<tr class="separator:adde59ad7324bdbe9a8bf3304144eb094"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classmets_1_1tabu__list__chain"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classmets_1_1tabu__list__chain')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classmets_1_1tabu__list__chain.html">mets::tabu_list_chain</a></td></tr>
<tr class="memitem:a67c5bfda6008cd463f4beac58e6e32d2 inherit pro_attribs_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="a67c5bfda6008cd463f4beac58e6e32d2"></a>
<a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>next_m</b></td></tr>
<tr class="separator:a67c5bfda6008cd463f4beac58e6e32d2 inherit pro_attribs_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0bd990b1bcdcc1ffb0193183eb8ff0b inherit pro_attribs_classmets_1_1tabu__list__chain"><td class="memItemLeft" align="right" valign="top"><a id="ae0bd990b1bcdcc1ffb0193183eb8ff0b"></a>
unsigned int&#160;</td><td class="memItemRight" valign="bottom"><b>tenure_m</b></td></tr>
<tr class="separator:ae0bd990b1bcdcc1ffb0193183eb8ff0b inherit pro_attribs_classmets_1_1tabu__list__chain"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>Simplistic implementation of a tabu-list. </p>
<p>This class implements one of the simplest and less memory hungry tabu lists. This tabu list memorizes only the moves (not the solutions).</p>
<p>Moves must be of <a class="el" href="classmets_1_1mana__move.html" title="A Mana Move is a move that can be automatically made tabu by the mets::simple_tabu_list.">mets::mana_move</a> type.</p>
<p>The comparison between moves is demanded to the move implementation.</p>
<p>A <a class="el" href="classmets_1_1mana__move.html" title="A Mana Move is a move that can be automatically made tabu by the mets::simple_tabu_list.">mets::mana_move</a> is tabu if it's in the tabu list by means of its operator== and hash function. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="acf40a93816b812b909d8c091eb5babdd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf40a93816b812b909d8c091eb5babdd">&#9670;&nbsp;</a></span>simple_tabu_list() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mets::simple_tabu_list::simple_tabu_list </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>tenure</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ctor. Makes a tabu list of the specified tenure. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">tenure</td><td>Tenure (length) of the tabu list </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;      : tabu_list_chain(<a class="code" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>), </div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    tabu_moves_m(), </div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    tabu_hash_m(<a class="code" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>) {}</div>
<div class="ttc" id="aclassmets_1_1tabu__list__chain_html_ade9d2204b5c29292e1e8392d1c6b9497"><div class="ttname"><a href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">mets::tabu_list_chain::tenure</a></div><div class="ttdeci">virtual unsigned int tenure() const</div><div class="ttdoc">Tenure of this tabu list.</div><div class="ttdef"><b>Definition:</b> tabu-search.hh:173</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a5d25561c383c65355e2f9aa8a45932f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d25561c383c65355e2f9aa8a45932f9">&#9670;&nbsp;</a></span>simple_tabu_list() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">mets::simple_tabu_list::simple_tabu_list </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmets_1_1tabu__list__chain.html">tabu_list_chain</a> *&#160;</td>
          <td class="paramname"><em>next</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>tenure</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ctor. Makes a tabu list of the specified tenure. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">tenure</td><td>Tenure (length) of the tabu list </td></tr>
    <tr><td class="paramname">next</td><td>Next list to invoke when this returns false </td></tr>
  </table>
  </dd>
</dl>
<div class="fragment"><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;      : tabu_list_chain(next, <a class="code" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>), </div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;    tabu_moves_m(), </div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;    tabu_hash_m(<a class="code" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>) {}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="afb83345be7ded09bc71fb56a98cc50e2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb83345be7ded09bc71fb56a98cc50e2">&#9670;&nbsp;</a></span>is_tabu()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool mets::simple_tabu_list::is_tabu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;&#160;</td>
          <td class="paramname"><em>sol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmets_1_1move.html">move</a> &amp;&#160;</td>
          <td class="paramname"><em>mov</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>True if the move is tabu for the given solution. </p>
<p>This implementation considers tabu each move already made less then <a class="el" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497" title="Tenure of this tabu list.">tenure()</a> moves ago.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sol</td><td>The current working solution </td></tr>
    <tr><td class="paramname">mov</td><td>The move to make tabu </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>True if this move was already made during the last tenure iterations </dd></dl>

<p>实现了 <a class="el" href="classmets_1_1tabu__list__chain.html#a5c7158bc02328a2ce191259f50b82281">mets::tabu_list_chain</a>.</p>
<div class="fragment"><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;{</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;  <span class="comment">// hash set. very fast but requires C++ ISO TR1 extension</span></div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;  <span class="comment">// and an hash function in every move (Omega(1)).</span></div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classmets_1_1simple__tabu__list.html#ac5a5ba0389d4e09042eb4efdf3266639">tabu</a> = (tabu_hash_m.find(&amp;<span class="keyword">dynamic_cast&lt;</span>mana_move&amp;<span class="keyword">&gt;</span>(mov)) </div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;           != tabu_hash_m.end());</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160; </div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;  <span class="keywordflow">if</span>(<a class="code" href="classmets_1_1simple__tabu__list.html#ac5a5ba0389d4e09042eb4efdf3266639">tabu</a>)</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160; </div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;  <span class="keywordflow">return</span> <a class="code" href="classmets_1_1tabu__list__chain.html#a5c7158bc02328a2ce191259f50b82281">tabu_list_chain::is_tabu</a>(sol, mov);</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;}</div>
<div class="ttc" id="aclassmets_1_1simple__tabu__list_html_ac5a5ba0389d4e09042eb4efdf3266639"><div class="ttname"><a href="classmets_1_1simple__tabu__list.html#ac5a5ba0389d4e09042eb4efdf3266639">mets::simple_tabu_list::tabu</a></div><div class="ttdeci">void tabu(feasible_solution &amp;sol, move &amp;mov)</div><div class="ttdoc">Make move a tabu.</div><div class="ttdef"><b>Definition:</b> tabu-search.hh:514</div></div>
<div class="ttc" id="aclassmets_1_1tabu__list__chain_html_a5c7158bc02328a2ce191259f50b82281"><div class="ttname"><a href="classmets_1_1tabu__list__chain.html#a5c7158bc02328a2ce191259f50b82281">mets::tabu_list_chain::is_tabu</a></div><div class="ttdeci">virtual bool is_tabu(feasible_solution &amp;sol, move &amp;mov) const =0</div><div class="ttdoc">True if the move is tabu for the given solution.</div><div class="ttdef"><b>Definition:</b> tabu-search.hh:498</div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ac5a5ba0389d4e09042eb4efdf3266639"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5a5ba0389d4e09042eb4efdf3266639">&#9670;&nbsp;</a></span>tabu()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void mets::simple_tabu_list::tabu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmets_1_1feasible__solution.html">feasible_solution</a> &amp;&#160;</td>
          <td class="paramname"><em>sol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmets_1_1move.html">move</a> &amp;&#160;</td>
          <td class="paramname"><em>mov</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Make move a tabu. </p>
<p>This implementation simply remembers "tenure" moves.</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sol</td><td>The current working solution </td></tr>
    <tr><td class="paramname">mov</td><td>The move to make tabu </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="classmets_1_1tabu__list__chain.html#a489d13452cd934ee18ec5a423585ab8f">mets::tabu_list_chain</a>.</p>
<div class="fragment"><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;{</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;  mana_move* mc = </div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;    <span class="keyword">dynamic_cast&lt;</span>mana_move&amp;<span class="keyword">&gt;</span>(mov).opposite_of();</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160; </div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;  <span class="comment">// This does nothing if the move was already tabu (can happen when</span></div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;  <span class="comment">// aspiration criteria is met).</span></div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;  std::pair&lt;move_map_type::iterator, bool&gt; </div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    insert_result = tabu_hash_m.insert(std::make_pair(mc, 1));</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;  <span class="comment">// If it was already in the map, increase the counter</span></div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;  <span class="keywordflow">if</span>(!insert_result.second) </div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;    {</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;      insert_result.first-&gt;second++;</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;      <span class="keyword">delete</span> mc;</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;      mc = insert_result.first-&gt;first;</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;    }</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;  <span class="comment">// Always add the move at the end of the list (when aspiration</span></div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;  <span class="comment">// criteria is met a move can be present more than one time in this</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;  <span class="comment">// list: this is correct, so the last made move is always the last</span></div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;  <span class="comment">// in the queue). </span></div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;  tabu_moves_m.push_back(mc);</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160; </div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;  <span class="comment">// Since we use the hash size, the tenure is the number of different</span></div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;  <span class="comment">// moves on the list (the tabu_moves_m can have more than tenure</span></div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;  <span class="comment">// elements)</span></div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;  <span class="keywordflow">while</span>(tabu_hash_m.size() &gt; this-&gt;<a class="code" href="classmets_1_1tabu__list__chain.html#ade9d2204b5c29292e1e8392d1c6b9497">tenure</a>())</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;    {</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;      <span class="comment">// update hash map *and* list structures</span></div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;      move_map_type::iterator elem = tabu_hash_m.find</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;    (<span class="keyword">dynamic_cast&lt;</span>mana_move*<span class="keyword">&gt;</span>(tabu_moves_m.front()));</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;      elem-&gt;second--;</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;      <span class="keywordflow">if</span>(elem-&gt;second == 0) </div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;    {</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;      mana_move* tmp = elem-&gt;first;</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;      tabu_hash_m.erase(elem);</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;      <span class="keyword">delete</span> tmp;</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;    }</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;      tabu_moves_m.pop_front();</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    }</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;  <a class="code" href="classmets_1_1tabu__list__chain.html#a489d13452cd934ee18ec5a423585ab8f">tabu_list_chain::tabu</a>(sol, mov);</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;}</div>
<div class="ttc" id="aclassmets_1_1tabu__list__chain_html_a489d13452cd934ee18ec5a423585ab8f"><div class="ttname"><a href="classmets_1_1tabu__list__chain.html#a489d13452cd934ee18ec5a423585ab8f">mets::tabu_list_chain::tabu</a></div><div class="ttdeci">virtual void tabu(feasible_solution &amp;sol, move &amp;mov)=0</div><div class="ttdoc">Make a move tabu when starting from a certain solution.</div><div class="ttdef"><b>Definition:</b> tabu-search.hh:491</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>recognition/include/pcl/recognition/3rdparty/metslib/<a class="el" href="tabu-search_8hh_source.html">tabu-search.hh</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>mets</b></li><li class="navelem"><a class="el" href="classmets_1_1simple__tabu__list.html">simple_tabu_list</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
